<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- 头部信息 -->
<head th:fragment="head(title)">
    <title th:text="${title}"></title>
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" th:href="@{/images/favicon.ico}" />
    <link rel="Shortcut Icon" th:href="@{/images/favicon.ico}" />
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}" media="all" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}" />
    <script type="text/javascript" charset="utf-8" th:src="@{/layui/layui.js}"></script>
    <script type="text/javascript" charset="utf-8" th:src="@{/lay-config.js}"></script>
    <!--[if lt IE 9]>
    <script type="text/javascript" th:src="@{/js/html5shiv.js}"></script>
    <script type="text/javascript" th:src="@{/js/respond.min.js}"></script><![endif]--><!--[if IE 6]>
    <script type="text/javascript" th:src="@{/js/DD_belatedPNG_0.0.8a-min.js}"></script>
    <script>DD_belatedPNG.fix('*');</script><![endif]-->
    <script>
    function editView(url, title) {
        layer.open({
            content: url,
            title: title,
            area: ['40%', '85%'],
            type: 2,
            fix: false, //不固定
            maxmin: true,
            shadeClose: true
        });
    }

    function delReq(ids, url) {
        $.ajax({
            type: 'post',
            url: url,
            dataType: 'json',
            data: {ids: ids},
            success: function (data) {
                if (data.code == 0) {
                    layer.msg(data.msg, {icon: 6});
                } else {
                    layer.msg(data.msg, {icon: 5});
                }
            },
            error: function (event) {
                errors(event);
            }
        });
    }

    function errors(event) {
        if (event.status == 401) {
            layer.msg("登录超时", {icon: 5, time: 2000}, function () {
                window.location.reload(true);//刷新当前页
            });
        } else {
            layer.msg(event.responseText, {icon: 5, time: 1000});
        }
    }
    </script>
</head>
<!-- 头部信息 -->
<div th:fragment="header">
    <div class="layui-header">
        <!-- logo 区域 -->
        <div class="layui-logo">
            <img src="images/security.png" alt="logo" style="margin-left: -5px;" />
            <cite>管理系统</cite>
        </div>
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item">
                <a lay-event="flexible" title="侧边伸缩" lay-unselect>
                    <i class="layui-icon layui-icon-shrink-right"></i>
                </a>
            </li>
            <!-- 面包屑 -->
            <span class="layui-breadcrumb layui-anim layui-anim-up">
                <a><cite>首页</cite></a>
            </span>
        </ul>
        <!-- 头像区域 -->
        <ul class="layui-nav layui-layout-right">
            <!--<li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a lay-event="clear" title="清理">
                    <i class="layui-icon layui-icon-delete"></i>
                </a>
            </li>-->
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a href="/" target="_blank" title="文档说明">
                    <i class="layui-icon layui-icon-website"></i>
                </a>
            </li>
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a id="layFull" lay-event="screenLayFull" lay-full="full" title="全屏">
                    <i class="layui-icon layui-icon-screen-full"></i>
                </a>
            </li>
            <li class="layui-nav-item user-selection">
                <a>
                    <img src="images/avatar.png" class="layui-nav-img" alt="头像">
                    <cite>管理员</cite>
                    <span class="layui-nav-more"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd lay-unselect><a lay-event="userInfo">基本资料</a></dd>
                    <dd lay-unselect><a lay-event="editPwd">修改密码</a></dd>
                    <hr>
                    <dd lay-unselect><a th:href="@{/logout}">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>

<!-- 尾部信息 -->
<div th:fragment="footer">
    <div class="layui-footer">
        <p>© 2018 <a href="#" target="_blank">layui.com</a></p>
    </div>
    <!-- 移动端遮罩 -->
    <div class="site-mobile-shade"></div>
</div>
</html>